<?php
include("./header.php");
include("./conndb.php");
$user = $_POST['username'];
$pass = $_POST['userpass'];
if ($conn) {
  $sql = "select * from vip where username='$user' and userpass = '$pass'";
  $res = mysqli_query($conn, $sql);
  $nums = mysqli_num_rows($res);
  if ($nums!=0) {
    echo 'success';  # 1 --->成功
  } else {
    echo 'fail';  # 0 --->失败
  }
} else {
  echo '连接失败';
}
//关闭数据库
mysqli_close($conn);
?>
